<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<script type="text/javascript" src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
    <script src="./js/axios-0.18.0.js"></script>
    <title>微信登录</title>
</head>
<body>
</body>
	<!--微信登录-->
	<div id="login_container"></div>
	
</body>
<script>
	//生成微信二维码
	 var obj = new WxLogin({
	 self_redirect:true,
	 id:"login_container", 
	 appid: "wx3bdb1192c22883f3", 
	 scope: "snsapi_login", 
	 redirect_uri: "http://note.java.itcast.cn/login/callback",
	 state: "",
	 style: "",
	 href: ""
	 });
	 //加载事件
    window.onload = function () {
        axios.get('login/checkLogin/').then(resp => {
            console.log(resp.data);
            localStorage.setItem("Authorization",resp.data)
            location.href = "main.html";
        });
    }


</script>
</html>